#include "Skill.h"

Skill::Skill(void)
{
}


Skill::~Skill(void)
{
}
Skill::Skill(int DamageValue, int DefenceValue, const char* cstr_SkillName)
{
	this->DamageValue = DamageValue;
	this->DefenceValue = DefenceValue;
	this->SkillName = cstr_SkillName;
	this->DefenceType = this->getDefenceType();
	this->DamageType = this->getDamageType();
}
Skill::Skill(int DamageValue, int DefenceValue, const char* cstr_SkillName, int tag)
{
	this->DamageValue = DamageValue;
	this->DefenceValue = DefenceValue;
	this->SkillName = cstr_SkillName;
	this->tag = tag;
}

void Skill::setDamageValue(int DamageValue)
{
	this->DamageValue = DamageValue;
}
int Skill::getDamageValue()
{
	return this->DamageValue;
}
void Skill::setDefenceValue(int DefenceValue)
{
	this->DefenceValue = DefenceValue;
}
int Skill::getDefenceValue()
{
	return this->DefenceValue;
}
void Skill::setSkillName(const char* cstr_SkillName)
{
	this->SkillName = cstr_SkillName;
}
string Skill::getSkillName()
{
	return this->SkillName;
}

int Skill::getDamageType()
{
	if (DamageType == 0)
	{
		this->DamageType = this->DamageValue / 10000;
	}
	return DamageType;
}
int Skill::getDefenceType()
{
	if (DefenceType == 0)
	{
		this->DefenceType = this->DefenceType / 10000;
	}
	return DefenceType;
}

void Skill::updateDamageValue(int Value)
{
	this->DamageValue += Value;
}
void Skill::updateDefenceValue(int Value)
{
	this->DefenceValue += Value;
}

void Skill::setTag(int tag)
{
	this->tag = tag;
}
int Skill::getTag()
{
	return this->tag;
}

